package com.shop.config;

import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.lang.reflect.Method;

/**
 * 缓存key自定义生成
 */
@Configuration
public class RedisGenatorConfig {

    @Bean("keyGenerator")
    public KeyGenerator keyGenerator(){
      return (Object o, Method method, Object... objects)-> method;
    }
}
